import jsonschema

# data1 = {
#     "success": True,
#     "code": 10000,
#     "message": "操作成功"
# }
#
# json1 = {
#     "type": "object",
#     "properties": {
#         "success": {
#             "type": "boolean"
#         },
#         "code": {
#             "type": "integer"
#         },
#         "message": {
#             "type": "string"
#         }
#     },
#     "required": [
#         "success",
#         "code",
#         "message",
#
#     ]
# }

a = 80
b = "123"
c = {"a":"123"}
d = [1,2,3]
e = 1.5
f = None
g = True

ruler = {"type":"boolean"}


resp = jsonschema.validate(instance=g, schema=ruler)
print(resp)




